<?php

	require "AdmUsuario.php";
	
	try{
		$adm = new AdmUsuario("configuracion.ini", "desarrollo");
		
		try{
			
			//$resLogin 	= $adm->loguear("amesa11", "amesa");
			
			//var_dump($resLogin);
			
			//$res 		= $adm->crearUsuario("alvaro", "alvaro", 'S', 'S', 'S');
			//$res 		= $adm->darDatosUsuario("amesa");
			
			$res = $adm->__asignarGrupo("amesa", "call-center");
			var_dump($res);
			
			//$adm->finalizar();
			print "\n-------------8888888888888888888888888888888888------------\n";
			
			//$res = $adm->getFuncionesUsuario("amesa");
			//var_dump($res);
			
			//$adm->finalizar();
			
			/*
			$login 		= "mquintana58";
			$password 	= "mquintana58"; 
			$activado 	= "S"; 
			$habilitado = "S";
			$externo 	= "S"; 
			$perfil 	= array("direccion" => "18 de julio 44", 
								"nombre"	=> "Maria44",
								"cedula"	=> "3102233444"); 
			$grupos 	= array("administrador");
			$res 		= $adm->altaUsuario($login, $password, $activado, $habilitado, $externo, $perfil, $grupos);
			
			var_dump($res);
			*/
		}
		catch(Exception $e){
			print "====== EL DE ADENTRO ========\n";
			$adm->finalizar();
			print $e->getCode() . "\n##########\n";
			print $e->getLine() . "\n##########\n";
			print $e->getFile() . "\n##########\n";
			print $e->getMessage() . "\n##########\n";
			//var_dump($e->getTrace());
			print "\n##########\n";
			//var_dump($e->getTraceAsString());
			print "\n##########\n";
			//var_dump($e);
		}
	}
	catch(Exception $e){
		print "====== EL DE AFUERA ========\n";
		print $e->getCode() . "\n##########\n";
		print $e->getLine() . "\n##########\n";
		print $e->getFile() . "\n##########\n";
		print $e->getMessage() . "\n##########\n";
		//var_dump($e->getTrace());
		print "\n##########\n";
		//var_dump($e->getTraceAsString());
		print "\n##########\n";
		//var_dump($e);
	}
?>